package com.sporadic.desk.controller;

import com.sporadic.desk.pojo.TableArea;
import com.sporadic.desk.service.TableAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import vo.ResponseData;

import java.util.List;

/**
 * @program: sporadic
 * @description:
 * @author: LHD   QQ:1727865856
 * @create: 2019-10-23 14:58
 **/
@CrossOrigin(value = "http://localhost:8080")
@RestController
public class TableAreaController {
    @Autowired
    private TableAreaService areaService;

    @GetMapping("/queryTableAll")
    public ResponseData<List<TableArea>> queryTableAll(Integer mid) {
        return new ResponseData<>(areaService.queryAll(mid));
    }
}
